var a = 31;
var b = 64;

console.log('The third bit is 1: ' + (((a >> 3) & 1) === 1));
console.log('The third bit is 1: ' + (((b >> 3) & 1) === 1));